package com.sto.stoapp.broadcast;

import com.sto.stoapp.activity.StoLoginActivity;
import com.sto.stoapp.db.StoFilePreference;

import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;

public class StartupService {

	public static class BootUpReceiver extends BroadcastReceiver {

		@Override
		public void onReceive(Context arg0, Intent arg1) {

			if (StoFilePreference.getInstance(arg0).getBootStrap()) {
				StoFilePreference.getInstance(arg0).setNeedLogin(true);
				Intent i = new Intent(arg0, StoLoginActivity.class);
				i.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
				arg0.startActivity(i);
			}

		}
	}
}
